IF  EXISTS (SELECT * FROM sys.objects WHERE object_id = OBJECT_ID(N'[dbo].[SrvrInstncType]') AND type in (N'U'))
BEGIN
     DROP TABLE [dbo].[SrvrInstncType]
END
GO

SET ANSI_NULLS ON
GO

SET QUOTED_IDENTIFIER ON
GO

SET ANSI_PADDING ON
GO

CREATE TABLE [dbo].[SrvrInstncType](
     [SrvrInstncTypeId]   [int]          NOT NULL,
     [SrvrInstncTypeCd]   [varchar](10)  NOT NULL,
     [SrvrInstncTypeName] [varchar](128) NOT NULL,
     [OLEDBProviderName]  [varchar](128) NOT NULL,
     [LastModDt]          [datetime]     NOT NULL CONSTRAINT [DF_SrvrInstncType_LastModDt] DEFAULT (getdate()),
     CONSTRAINT [PK_SrvrInstncType] PRIMARY KEY CLUSTERED ( [SrvrInstncTypeId] ASC )
) ON [PRIMARY]
GO

SET ANSI_PADDING OFF
GO

CREATE NONCLUSTERED INDEX [IX_SrvrInstncType_Code] ON [dbo].[SrvrInstncType] ( [SrvrInstncTypeCd] ASC ) ON [Data_Index]
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Unique Identifier of a particular Server Instance Type.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncType', @level2type=N'COLUMN',@level2name=N'SrvrInstncTypeId'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Secondary Unique Identifier of a particular Server Instance Type, user defined.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncType', @level2type=N'COLUMN',@level2name=N'SrvrInstncTypeCd'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'User-friendly description of the Server Instance Type.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncType', @level2type=N'COLUMN',@level2name=N'SrvrInstncTypeName'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'The name of the OLEDB provider, used to build generic connection strings.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncType', @level2type=N'COLUMN',@level2name=N'OLEDBProviderName'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'The last date/time the record was changed.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncType', @level2type=N'COLUMN',@level2name=N'LastModDt'
GO

EXEC sys.sp_addextendedproperty @name=N'MS_Description', @value=N'Server instance types.  Contains master list of server instance types such as MSSQL, SYBASE, and ORACLE.' , @level0type=N'SCHEMA',@level0name=N'dbo', @level1type=N'TABLE',@level1name=N'SrvrInstncType'
GO
